﻿<UserControl x:Class="Skynet.WPF4.Views.NewControls.NewControlsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Skynet.WPF4.Views.NewControls"
             mc:Ignorable="d" 
             
             d:DesignHeight="300" d:DesignWidth="300"
              Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <local:GenderTemplateSelector x:Key="gendercustomselector">
            <local:GenderTemplateSelector.FemaleTemplate>
                <DataTemplate>
                    <Grid Background="Pink">
                        <Image Source="{Binding image}"></Image>
                    </Grid>
                    
                </DataTemplate>
            </local:GenderTemplateSelector.FemaleTemplate>
            <local:GenderTemplateSelector.MaleTemplate>
                <DataTemplate>
                    <Grid Background="Silver">
                        <Image Source="{Binding image}"></Image>
                    </Grid>
                    
                </DataTemplate>
            </local:GenderTemplateSelector.MaleTemplate>
        </local:GenderTemplateSelector>
    </UserControl.Resources>
        <StackPanel Orientation="Vertical">

            <DataGrid ItemsSource="{Binding Authors}" AutoGenerateColumns="False"
                       RowDetailsTemplateSelector="{StaticResource gendercustomselector}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="name" Binding="{Binding nombre}"></DataGridTextColumn>
                    <DataGridTemplateColumn Header="Image" Width="SizeToCells" IsReadOnly="True">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                        
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    
                </DataGrid.Columns>
                <!--<DataGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <Image Source="{Binding image}" Width="100" Height="100" Stretch="Fill" />
                    </DataTemplate>
                </DataGrid.RowDetailsTemplate>-->
            </DataGrid>
        <Calendar SelectionMode="MultipleRange" DisplayMode="Month"   >
            <Calendar.BlackoutDates>                
                    <CalendarDateRange Start="01/01/2010" End="01/06/2010" />                                    
            </Calendar.BlackoutDates>

        </Calendar>
        <DatePicker DisplayDate="01/01/2010">
            
        </DatePicker>
    </StackPanel>
    
</UserControl>
